<!DOCTYPE html>
<html>

<head>
  <!-- 引入样式 -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css" />
  <link rel="stylesheet" href="../layui/css/layui.css">
  <meta charset="utf-8" />
  <title>程序控制台</title>
</head>

<body>

  <div class="layui-layout layui-layout-admin">
    <div class="layui-header header header-demo">
      <div class="layui-logo layui-hide-xs layui-bg-black">软件安全课程设计</div>
      <!-- 头部区域（可配合layui 已有的水平导航） -->
      <ul class="layui-nav layui-layout-left">
        <!-- 移动端显示 -->
        <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
          <i class="layui-icon layui-icon-spread-left"></i>
        </li>

        <li class="layui-nav-item layui-hide-xs"><a href="../testClient.html">首页</a></li>
        <li class="layui-nav-item layui-hide-xs layui-this"><a href="./hookShow.html">Hook控制台</a></li>
        <li class="layui-nav-item layui-hide-xs"><a href="">Download</a></li>
        <li class="layui-nav-item">
          <a href="javascript:;">更多设置</a>
          <dl class="layui-nav-child">
            <dd><a href="">menu 11</a></dd>
            <dd><a href="">menu 22</a></dd>
            <dd><a href="">menu 33</a></dd>
          </dl>
        </li>
      </ul>
      <ul class="layui-nav layui-layout-right">
        <li class="layui-nav-item layui-hide layui-show-md-inline-block">
          <a href="javascript:;">
            <img
              src="https://tse1-mm.cn.bing.net/th/id/R-C.a6ba600aa28d9a9f5272418856683c0f?rik=k8NSQJEc5%2bEMWg&riu=http%3a%2f%2fp2.music.126.net%2f19GQB9UUuqFwHaF63aUQcQ%3d%3d%2f109951164893392701.jpg&ehk=s1a2iuJ3QSHy0XaUyQMOv8F9GAZJo6j6MwRUBvroV4U%3d&risl=&pid=ImgRaw&r=0"
              class="layui-nav-img" />
            shandianchengzi
          </a>
          <dl class="layui-nav-child">
            <dd><a href="">Your Profile</a></dd>
            <dd><a href="">Settings</a></dd>
            <dd><a href="">Sign out</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
          <a href="javascript:;">
            <i class="layui-icon layui-icon-more-vertical"></i>
          </a>
        </li>
      </ul>
    </div>

    <div class="layui-side layui-bg-black">
      <div class="layui-side-scroll">
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <ul class="layui-nav layui-nav-tree" lay-filter="nav">
          <!-- TODO: 设置默认选中 -->
          <li class="layui-nav-item layui-this">
            <a class="" href="javascript:; ">进程信息</a>
          </li>
          <li class="layui-nav-item layui-nav-itemed">
            <a href="javascript:;">Hook函数信息</a>
            <dl class="layui-nav-child" id="hookFunc">
              <dd><a href="javascript:;">MessageBox</a></dd>
              <dd><a href="javascript:;">堆操作</a></dd>
              <dd><a href="javascript:;">网络通信</a></dd>
              <dd><a href="javascript:;">文件操作</a></dd>
              <dd><a href="javascript:;">注册表</a></dd>
            </dl>
          </li>
          <li class="layui-nav-item" lay-filter="Unexpected">
            <a href="javascript:;">异常分析</a>
            <dl class="layui-nav-child">
              <dd><a href="javascript:;">堆操作问题</a></dd>
              <dd><a href="javascript:;">网络通信行为</a></dd>
              <dd><a href="javascript:;">文件操作异常</a></dd>
              <dd><a href="javascript:;">注册表可疑操作</a></dd>
              <dd><a href="javascript:;">内存拷贝监测与关联</a></dd>
            </dl>
          </li>
        </ul>
      </div>
    </div>

    <div class="layui-body">
      <!-- 内容主体区域 -->
      <div>
        <div class="layui-bg-gray" style="padding: 30px;">
          <fieldset class="layui-elem-field layui-field-title">
            <legend>基本信息</legend>
          </fieldset>
          <div class="layui-panel">
            <div style="padding: 30px 20px 0px 0px;">
              <form class="layui-form" action="" lay-filter="hookBegin">
                <div class="layui-form-item">
                  <label class="layui-form-label">EXE</label>
                  <div class="layui-input-block">
                    <input type="text" name="exePath" lay-verify="path" autocomplete="off"
                      placeholder="请输入需要hook的EXE绝对路径" class="layui-input">
                  </div>
                </div>
                <!-- <button type="button" class="layui-btn layui-btn-normal" id="openFile">选择文件</button> -->
                <div class="layui-form-item">
                  <label class="layui-form-label">Server</label>
                  <div class="layui-input-block">
                    <input type="text" name="hookPath" lay-verify="path" autocomplete="off" placeholder="请输入下载的程序的绝对路径"
                      class="layui-input">
                  </div>
                </div>
                <div class="layui-form-item">
                  <div class="layui-input-block">
                    <div class="layui-btn-container">
                      <button type="button" class="layui-btn layui-btn-primary layui-border-green"
                        lay-btn="setDefault">填入默认值</button>
                      <button type="reset" class="layui-btn layui-btn-primary layui-border-green">清空</button>
                      <div class="layui-btn-container" style="float:right">
                        <button type="submit" class="layui-btn" lay-submit="" lay-filter="startHook"><i
                            class="layui-icon layui-icon-play"></i>连接</button>
                        <button type="button" class="layui-btn" lay-btn="btn_pause" is_pause="0" id="btnPause"><i
                            class="layui-icon layui-icon-pause"></i>暂停</button>
                        <button type="button" class="layui-btn" lay-btn="btn_close" style="margin-right: 0px;"><i
                            class="layui-icon layui-icon-close"></i>断连</button>
                      </div>
                    </div>
                  </div>
                </div>
              </form>
            </div>
          </div>

        </div>
        <div class="layui-bg-gray" style="padding: 30px 30px 100px 30px; visibility: hidden;" id="exe_info">
          <div class="layui-row">
            <div class="layui-col-xs6">
          <fieldset class="layui-elem-field layui-field-title">
            <legend>Hook信息</legend>
          </fieldset>
        </div>
        <div class="layui-col-xs6" style="display: none;" id="btn_info">
          <button type="button" class="layui-btn layui-btn-sm" lay-btn="clearList" style="float: right; margin:10px;">
            <i class="layui-icon layui-icon-delete"></i>清空
          </button>
          <button type="button" class="layui-btn layui-btn-sm" lay-btn="refresh" style="float: right; margin:10px;">
            <i class="layui-icon layui-icon-delete"></i>刷新
          </button>
          <button type="button" class="layui-btn layui-btn-sm" lay-btn="refresh_auto" style="float: right; margin:10px;">
            <i class="layui-icon layui-icon-delete"></i>开启自动刷新
          </button>
        </div>
      </div>
          <div class="layui-card">
            <!-- 进程与EXE信息 -->
            <div id="pro_info" style="display:block;">
              <div class="layui-card-header">新创建的进程和EXE的信息</div>
              <div class="layui-card-body">
                <div class="layui-collapse" lay-accordion="">
                  <div class="layui-colla-item">
                    <h2 class="layui-colla-title">进程Process</h2>
                    <div class="layui-colla-content layui-show" style="padding: 0px;">
                      <table class="layui-table" id="process_info">
                        <tbody>
                          <tr>
                            <td>Name</td>
                            <td id="pro_name"></td>
                          </tr>
                          <tr>
                            <td>PID</td>
                            <td id="pro_pid"></td>
                          </tr>
                          <tr>
                            <td>Priority</td>
                            <td id="pro_priority"></td>
                          </tr>
                        </tbody>
                      </table>
                    </div>
                  </div>
                </div>
                <div class="layui-collapse" lay-accordion="">
                  <div class="layui-colla-item">
                    <h2 class="layui-colla-title">EXE信息</h2>
                    <div class="layui-colla-content" style="padding: 0px;">
                      <table class="layui-table" id="exeInfo">
                        <tbody>
                          <tr>
                            <td>Path</td>
                            <td id="exe_path"></td>
                          </tr>
                          <tr>
                            <td>Size</td>
                            <td id="exe_size"></td>
                          </tr>
                          <tr>
                            <td>Drive</td>
                            <td id="exe_drive"></td>
                          </tr>
                        </tbody>
                      </table>
                    </div>
                  </div>
                </div>
                <div class="layui-collapse" lay-accordion="">
                  <div class="layui-colla-item">
                    <h2 class="layui-colla-title">Thread信息</h2>
                    <div class="layui-colla-content" style="padding: 0px;">
                      <table class="layui-table" id="threadInfo">
                        <tbody>
                          <tr>
                            <td>Path</td>
                            <td id="thread_id"></td>
                          </tr>
                          <tr>
                            <td>Size</td>
                            <td id="thread_handle"></td>
                          </tr>
                        </tbody>
                      </table>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <!-- Hook函数信息 -->
            <div id="func_info" style="display:none;">
              <div class="layui-card-header">
                [函数组别]
              </div>
              <div class="layui-card-body" id="func_body">
                  <div id="argv_tree" class="demo-tree"></div>
              </div>
            </div>
            <!-- 异常分析 -->
            <div id="about_analysis" style="display:none;">
              <div class="layui-card-header" id="about_name">
                涉及的
              </div>
              <div class="layui-card-body">
                <div id="about_tree" class="demo-tree"></div>
              </div>
              <div class="layui-row layui-card-header">
                  行为分析
              </div>
              <div class="layui-card-body" id="analysis">
                  <div id="analysis_tree" class="demo-tree"></div>
              </div>
            </div>
          </div>
        </div>


      </div>
    </div>

    <div class="layui-footer">
      <!-- 底部固定区域 -->
      底部固定区域
    </div>
  </div>
  <script src="../layui/layui.js"></script>
</body>
<script></script>
<script type="text/javascript" src="./hookShow.js"></script>

</html>